package behavior.state;

/**
 * @author dali
 * @date 2021-07-28 13:54
 * @Description
 */

public abstract class State {
    private static final Exception NotSupportException = new RuntimeException("不能直接使用超类提供的方法");
    //默认实现
    //启动
    public void start(Context context) throws Exception{
        throw NotSupportException;
    }
    //获取时间片
    public void getCPU(Context context) throws Exception{
        throw NotSupportException;
    }
    //进行阻塞
    public void suspend(Context context) throws Exception{
        throw NotSupportException;
    }
    //进行停止
    public void stop(Context context) throws Exception{
        throw NotSupportException;
    }
    //阻塞恢复
    public void resume(Context context) throws Exception{
        throw NotSupportException;
    }
}
